home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 July: Mac OS SDK / Dev.CD Jul 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / CIncludes / SpeechRecognition.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-03  |  19.9 KB  |  472 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        SpeechRecognition.h
  3.  
  4.      Contains:    Apple Speech Recognition Toolbox Interfaces.
  5.  
  6.      Version:    Technology:    PlainTalk 1.5
  7.                  Package:    Universal Interfaces 2.1.3
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __SPEECHRECOGNITION__
  21. #define __SPEECHRECOGNITION__
  22.  
  23. #ifndef __MEMORY__
  24. #include <Memory.h>
  25. #endif
  26.  
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif
  30.  
  31. #if PRAGMA_IMPORT_SUPPORTED
  32. #pragma import on
  33. #endif
  34.  
  35. #if PRAGMA_ALIGN_SUPPORTED
  36. #pragma options align=mac68k
  37. #endif
  38.  
  39.  
  40. enum {
  41.     gestaltSpeechRecognitionVersion = 'srtb',
  42.     gestaltSpeechRecognitionAttr = 'srta'
  43. };
  44.  
  45.  
  46. enum {
  47.     gestaltDesktopSpeechRecognition = 1L << 0,
  48.     gestaltTelephoneSpeechRecognition = 1L << 1
  49. };
  50.  
  51. /* Error Codes [Speech recognition gets -5100 through -5199] */
  52.  
  53. enum {
  54.     kSRNotAvailable                = -5100,                        /* the service requested is not avail or applicable */
  55.     kSRInternalError            = -5101,                        /* a system internal or hardware error condition */
  56.     kSRComponentNotFound        = -5102,                        /* a needed system resource was not located */
  57.     kSROutOfMemory                = -5103,                        /* an out of memory error occurred in the toolbox memory space */
  58.     kSRNotASpeechObject            = -5104,                        /* the object specified is no longer or never was valid */
  59.     kSRBadParameter                = -5105,                        /* an invalid parameter was specified */
  60.     kSRParamOutOfRange            = -5106,                        /* when we say 0-100, don't pass in 101. */
  61.     kSRBadSelector                = -5107,                        /* an unrecognized selector was specified */
  62.     kSRBufferTooSmall            = -5108,                        /* returned from attribute access functions */
  63.     kSRNotARecSystem            = -5109,                        /* the object used was not a SRRecognitionSystem */
  64.     kSRFeedbackNotAvail            = -5110,                        /* there is no feedback window associated with SRRecognizer */
  65.     kSRCantSetProperty            = -5111,                        /* a non-settable property was specified */
  66.     kSRCantGetProperty            = -5112,                        /* a non-gettable property was specified */
  67.     kSRCantSetDuringRecognition    = -5113,                        /* the property can't be set while recognition is in progress -- do before or between utterances. */
  68.     kSRAlreadyListening            = -5114,                        /* in response to SRStartListening */
  69.     kSRNotListeningState        = -5115,                        /* in response to SRStopListening */
  70.     kSRModelMismatch            = -5116,                        /* no acoustical models are avail to match request */
  71.     kSRNoClientLanguageModel    = -5117,                        /* trying to access a non-specified SRLanguageModel */
  72.     kSRNoPendingUtterances        = -5118,                        /* nothing to continue search on */
  73.     kSRRecognitionCanceled        = -5119,                        /* an abort error occurred during search */
  74.     kSRRecognitionDone            = -5120,                        /* search has finished, but nothing was recognized */
  75.     kSROtherRecAlreadyModal        = -5121,                        /* another recognizer is modal at the moment, so can't set this recognizer's kSRBlockModally property right now */
  76.     kSRHasNoSubItems            = -5122,                        /* SRCountItems or related routine was called on an object without subelements -- e.g. a word -- rather than phrase, path, or LM. */
  77.     kSRSubItemNotFound            = -5123,                        /* returned when accessing a non-existent sub item of a container */
  78.     kSRLanguageModelTooBig        = -5124,                        /* Cant build language models so big */
  79.     kSRAlreadyReleased            = -5125,                        /* this object has already been released before */
  80.     kSRAlreadyFinished            = -5126,                        /* the language model can't be finished twice */
  81.     kSRWordNotFound                = -5127,                        /* the spelling couldn't be found in lookup(s) */
  82.     kSRNotFinishedWithRejection    = -5128,                        /* property not found because the LMObj is not finished with rejection */
  83.     kSRExpansionTooDeep            = -5129,                        /* Language model is left recursive or is embedded too many levels */
  84.     kSRTooManyElements            = -5130,                        /* Too many elements added to phrase or path or other langauge model object */
  85.     kSRCantAdd                    = -5131,                        /* Can't add given type of object to the base SRLanguageObject (e.g.in SRAddLanguageObject)    */
  86.     kSRSndInSourceDisconnected    = -5132,                        /* Sound input source is disconnected */
  87.     kSRCantReadLanguageObject    = -5133,                        /* An error while trying to create new Language object from file or pointer -- possibly bad format */
  88.                                                                 /* non-release debugging error codes are included here */
  89.     kSRNotImplementedYet        = -5199                            /* you'd better wait for this feature in a future release */
  90. };
  91.  
  92. /* Type Definitions */
  93. typedef struct OpaqueSRSpeechObject* SRSpeechObject;
  94. typedef SRSpeechObject SRRecognitionSystem;
  95. typedef SRSpeechObject SRRecognizer;
  96. typedef SRSpeechObject SRSpeechSource;
  97. typedef SRSpeechSource SRRecognitionResult;
  98. typedef SRSpeechObject SRLanguageObject;
  99. typedef SRLanguageObject SRLanguageModel;
  100. typedef SRLanguageObject SRPath;
  101. typedef SRLanguageObject SRPhrase;
  102. typedef SRLanguageObject SRWord;
  103. /* between 0 and 100 */
  104. typedef unsigned short SRSpeedSetting;
  105. /* between 0 and 100 */
  106. typedef unsigned short SRRejectionLevel;
  107. /* When an event occurs, the user supplied proc will be called with a pointer    */
  108. /*    to the param passed in and a flag to indicate conditions such                */
  109. /*    as interrupt time or system background time.                                */
  110. struct SRCallBackStruct {
  111.     long                             what;                        /* one of notification flags */
  112.     long                             message;                    /* contains SRRecognitionResult id */
  113.     SRRecognizer                     instance;                    /* ID of recognizer being notified */
  114.     OSErr                             status;                        /* result status of last search */
  115.     short                             flags;                        /* non-zero if occurs during interrupt */
  116.     long                             refCon;                        /* user defined - set from SRCallBackParam */
  117. };
  118. typedef struct SRCallBackStruct SRCallBackStruct;
  119.  
  120. /* Call back procedure definition */
  121. typedef pascal void (*SRCallBackProcPtr)(SRCallBackStruct *param);
  122.  
  123. #if GENERATINGCFM
  124. typedef UniversalProcPtr SRCallBackUPP;
  125. #else
  126. typedef SRCallBackProcPtr SRCallBackUPP;
  127. #endif
  128.  
  129. enum {
  130.     uppSRCallBackProcInfo = kPascalStackBased
  131.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(SRCallBackStruct *)))
  132. };
  133.  
  134. #if GENERATINGCFM
  135. #define NewSRCallBackProc(userRoutine)        \
  136.         (SRCallBackUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppSRCallBackProcInfo, GetCurrentArchitecture())
  137. #else
  138. #define NewSRCallBackProc(userRoutine)        \
  139.         ((SRCallBackUPP) (userRoutine))
  140. #endif
  141.  
  142. #if GENERATINGCFM
  143. #define CallSRCallBackProc(userRoutine, param)        \
  144.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppSRCallBackProcInfo, (param))
  145. #else
  146. #define CallSRCallBackProc(userRoutine, param)        \
  147.         (*(userRoutine))((param))
  148. #endif
  149. struct SRCallBackParam {
  150.     SRCallBackUPP                     callBack;
  151.     long                             refCon;
  152. };
  153. typedef struct SRCallBackParam SRCallBackParam;
  154.  
  155. /* Recognition System Types */
  156.  
  157. enum {
  158.     kSRDefaultRecognitionSystemID = 0
  159. };
  160.  
  161. /* Recognition System Properties */
  162.  
  163. enum {
  164.     kSRFeedbackAndListeningModes = 'fbwn',                        /* short: one of kSRNoFeedbackHasListenModes, kSRHasFeedbackHasListenModes, kSRNoFeedbackNoListenModes */
  165.     kSRRejectedWord                = 'rejq',                        /* the SRWord used to represent a rejection */
  166.     kSRCleanupOnClientExit        = 'clup'                        /* Boolean: Default is true. The rec system and everything it owns is disposed when the client application quits */
  167. };
  168.  
  169.  
  170. enum {
  171.     kSRNoFeedbackNoListenModes    = 0,                            /* next allocated recognizer has no feedback window and doesn't use listening modes    */
  172.     kSRHasFeedbackHasListenModes = 1,                            /* next allocated recognizer has feedback window and uses listening modes             */
  173.     kSRNoFeedbackHasListenModes    = 2                                /* next allocated recognizer has no feedback window but does use listening modes     */
  174. };
  175.  
  176. /* Speech Source Types */
  177.  
  178. enum {
  179.     kSRDefaultSpeechSource        = 0,
  180.     kSRLiveDesktopSpeechSource    = 'dklv',                        /* live desktop sound input */
  181.     kSRCanned22kHzSpeechSource    = 'ca22'                        /* AIFF file based 16 bit, 22.050 KHz sound input */
  182. };
  183.  
  184. /* Notification via Apple Event or Callback */
  185. /* Notification Flags */
  186.  
  187. enum {
  188.     kSRNotifyRecognitionBeginning = 1L << 0,                    /* recognition can begin. client must now call SRContinueRecognition or SRCancelRecognition */
  189.     kSRNotifyRecognitionDone    = 1L << 1                        /* recognition has terminated. result (if any) is available. */
  190. };
  191.  
  192. /* Apple Event selectors */
  193. /* AppleEvent message class  */
  194.  
  195. enum {
  196.     kAESpeechSuite                = 'sprc'
  197. };
  198.  
  199. /* AppleEvent message event ids */
  200.  
  201. enum {
  202.     kAESpeechDone                = 'srsd',
  203.     kAESpeechDetected            = 'srbd'
  204. };
  205.  
  206. /* AppleEvent Parameter ids */
  207.  
  208. enum {
  209.     keySRRecognizer                = 'krec',
  210.     keySRSpeechResult            = 'kspr',
  211.     keySRSpeechStatus            = 'ksst'
  212. };
  213.  
  214. /* AppleEvent Parameter types */
  215.  
  216. enum {
  217.     typeSRRecognizer            = 'trec',
  218.     typeSRSpeechResult            = 'tspr'
  219. };
  220.  
  221. /* SRRecognizer Properties */
  222.  
  223. enum {
  224.     kSRNotificationParam        = 'noti',                        /* see notification flags below */
  225.     kSRCallBackParam            = 'call',                        /* type SRCallBackParam */
  226.     kSRSearchStatusParam        = 'stat',                        /* see status flags below */
  227.     kSRAutoFinishingParam        = 'afin',                        /* automatic finishing applied on LM for search */
  228.     kSRForegroundOnly            = 'fgon',                        /* Boolean. Default is true. If true, client recognizer only active when in foreground.    */
  229.     kSRBlockBackground            = 'blbg',                        /* Boolean. Default is false. If true, when client recognizer in foreground, rest of LMs are inactive.    */
  230.     kSRBlockModally                = 'blmd',                        /* Boolean. Default is false. When true, this client's LM is only active LM; all other LMs are inactive. Be nice, don't be modal for long periods! */
  231.     kSRWantsResultTextDrawn        = 'txfb',                        /* Boolean. Default is true. If true, search results are posted to Feedback window */
  232.     kSRWantsAutoFBGestures        = 'dfbr',                        /* Boolean. Default is true. If true, client needn't call SRProcessBegin/End to get default feedback behavior */
  233.     kSRSoundInVolume            = 'volu',                        /* short in [0..100] log scaled sound input power. Can't set this property */
  234.     kSRReadAudioFSSpec            = 'aurd',                        /* *FSSpec. Specify FSSpec where raw audio is to be read (AIFF format) using kSRCanned22kHzSpeechSource. Reads until EOF */
  235.     kSRCancelOnSoundOut            = 'caso',                        /* Boolean: Default is true.  If any sound is played out during utterance, recognition is aborted. */
  236.     kSRSpeedVsAccuracyParam        = 'sped'                        /* SRSpeedSetting between 0 and 100 */
  237. };
  238.  
  239. /* 0 means more accurate but slower. */
  240. /* 100 means (much) less accurate but faster. */
  241.  
  242. enum {
  243.     kSRUseToggleListen            = 0,                            /* listen key modes */
  244.     kSRUsePushToTalk            = 1
  245. };
  246.  
  247.  
  248. enum {
  249.     kSRListenKeyMode            = 'lkmd',                        /* short: either kSRUseToggleListen or kSRUsePushToTalk */
  250.     kSRListenKeyCombo            = 'lkey',                        /* short: Push-To-Talk key combination; high byte is high byte of event->modifiers, the low byte is the keycode from event->message */
  251.     kSRListenKeyName            = 'lnam',                        /* Str63: string representing ListenKeyCombo */
  252.     kSRKeyWord                    = 'kwrd',                        /* Str255: keyword preceding spoken commands in kSRUseToggleListen mode */
  253.     kSRKeyExpected                = 'kexp'                        /* Boolean: Must the PTT key be depressed or the key word spoken before recognition can occur? */
  254. };
  255.  
  256. /* Operational Status Flags */
  257.  
  258. enum {
  259.     kSRIdleRecognizer            = 1L << 0,                        /* engine is not active */
  260.     kSRSearchInProgress            = 1L << 1,                        /* search is in progress */
  261.     kSRSearchWaitForAllClients    = 1L << 2,                        /* search is suspended waiting on all clients' input */
  262.     kSRMustCancelSearch            = 1L << 3,                        /* something has occurred (sound played, non-speech detected) requiring the search to abort */
  263.     kSRPendingSearch            = 1L << 4                        /* we're about to start searching */
  264. };
  265.  
  266. /* Recognition Result Properties */
  267.  
  268. enum {
  269.     kSRTEXTFormat                = 'TEXT',                        /* raw text in user supplied memory */
  270.     kSRPhraseFormat                = 'lmph',                        /* SRPhrase containing result words */
  271.     kSRPathFormat                = 'lmpt',                        /* SRPath containing result phrases or words */
  272.     kSRLanguageModelFormat        = 'lmfm'                        /* top level SRLanguageModel for post parse */
  273. };
  274.  
  275. /* SRLanguageObject Family Properties */
  276.  
  277. enum {
  278.     kSRSpelling                    = 'spel',                        /* spelling of a SRWord or SRPhrase or SRPath, or name of a SRLanguageModel */
  279.     kSRLMObjType                = 'lmtp',                        /* Returns one of SRLanguageObject Types listed below */
  280.     kSRRefCon                    = 'refc',                        /* 4 bytes of user storage */
  281.     kSROptional                    = 'optl',                        /* Boolean -- true if SRLanguageObject is optional    */
  282.     kSREnabled                    = 'enbl',                        /* Boolean -- true if SRLanguageObject enabled */
  283.     kSRRepeatable                = 'rptb',                        /* Boolean -- true if SRLanguageObject is repeatable */
  284.     kSRRejectable                = 'rjbl',                        /* Boolean -- true if SRLanguageObject is rejectable (Recognition System's kSRRejectedWord */
  285.                                                                 /*        object can be returned in place of SRLanguageObject with this property)    */
  286.     kSRRejectionLevel            = 'rjct'                        /* SRRejectionLevel between 0 and 100 */
  287. };
  288.  
  289. /* LM Object Types -- returned as kSRLMObjType property of language model objects */
  290.  
  291. enum {
  292.     kSRLanguageModelType        = 'lmob',                        /* SRLanguageModel */
  293.     kSRPathType                    = 'path',                        /* SRPath */
  294.     kSRPhraseType                = 'phra',                        /* SRPhrase */
  295.     kSRWordType                    = 'word'                        /* SRWord */
  296. };
  297.  
  298. /* a normal and reasonable rejection level */
  299.  
  300. enum {
  301.     kSRDefaultRejectionLevel    = 50
  302. };
  303.  
  304. /********************************************************************************/
  305. /*                        NOTES ON USING THE API                                    */
  306. /*                                                                                */
  307. /*        All operations (with the exception of SRGetRecognitionSystem) are        */
  308. /*        directed toward an object allocated or begot from New, Get and Read        */
  309. /*        type calls.                                                                */
  310. /*                                                                                */
  311. /*        There is a simple rule in dealing with allocation and disposal:            */
  312. /*                                                                                */
  313. /*        *    all toolbox allocations are obtained from a SRRecognitionSystem        */
  314. /*                                                                                */
  315. /*        *    if you obtain an object via New or Get, then you own a reference     */
  316. /*            to that object and it must be released via SRReleaseObject when        */
  317. /*            you no longer need it                                                */
  318. /*                                                                                */
  319. /*        *    when you receive a SRRecognitionResult object via AppleEvent or        */
  320. /*            callback, it has essentially been created on your behalf and so        */
  321. /*            you are responsible for releasing it as above                        */
  322. /*                                                                                */
  323. /*        *    when you close a SRRecognitionSystem, all remaining objects which        */
  324. /*            were allocated with it will be forcefully released and any            */
  325. /*            remaining references to those objects will be invalid.                */
  326. /*                                                                                */
  327. /*        This translates into a very simple guideline:                            */
  328. /*            If you allocate it or have it allocated for you, you must release    */
  329. /*            it.  If you are only peeking at it, then don't release it.            */
  330. /*                                                                                */
  331. /********************************************************************************/
  332. /* Opening and Closing of the SRRecognitionSystem */
  333. extern pascal OSErr SROpenRecognitionSystem(SRRecognitionSystem *system, OSType systemID)
  334.  THREEWORDINLINE(0x303C, 0x0400, 0xAA56);
  335.  
  336. extern pascal OSErr SRCloseRecognitionSystem(SRRecognitionSystem system)
  337.  THREEWORDINLINE(0x303C, 0x0201, 0xAA56);
  338.  
  339. /* Accessing Properties of any Speech Object */
  340. extern pascal OSErr SRSetProperty(SRSpeechObject srObject, OSType selector, const void *property, Size propertyLen)
  341.  THREEWORDINLINE(0x303C, 0x0802, 0xAA56);
  342.  
  343. extern pascal OSErr SRGetProperty(SRSpeechObject srObject, OSType selector, void *property, Size *propertyLen)
  344.  THREEWORDINLINE(0x303C, 0x0803, 0xAA56);
  345.  
  346. /* Any object obtained via New or Get type calls must be released */
  347. extern pascal OSErr SRReleaseObject(SRSpeechObject srObject)
  348.  THREEWORDINLINE(0x303C, 0x0204, 0xAA56);
  349.  
  350. extern pascal OSErr SRGetReference(SRSpeechObject srObject, SRSpeechObject *newObjectRef)
  351.  THREEWORDINLINE(0x303C, 0x0425, 0xAA56);
  352.  
  353. /* SRRecognizer Instance Functions */
  354. extern pascal OSErr SRNewRecognizer(SRRecognitionSystem system, SRRecognizer *recognizer, OSType sourceID)
  355.  THREEWORDINLINE(0x303C, 0x060A, 0xAA56);
  356.  
  357. extern pascal OSErr SRStartListening(SRRecognizer recognizer)
  358.  THREEWORDINLINE(0x303C, 0x020C, 0xAA56);
  359.  
  360. extern pascal OSErr SRStopListening(SRRecognizer recognizer)
  361.  THREEWORDINLINE(0x303C, 0x020D, 0xAA56);
  362.  
  363. extern pascal OSErr SRSetLanguageModel(SRRecognizer recognizer, SRLanguageModel languageModel)
  364.  THREEWORDINLINE(0x303C, 0x040E, 0xAA56);
  365.  
  366. extern pascal OSErr SRGetLanguageModel(SRRecognizer recognizer, SRLanguageModel *languageModel)
  367.  THREEWORDINLINE(0x303C, 0x040F, 0xAA56);
  368.  
  369. extern pascal OSErr SRContinueRecognition(SRRecognizer recognizer)
  370.  THREEWORDINLINE(0x303C, 0x0210, 0xAA56);
  371.  
  372. extern pascal OSErr SRCancelRecognition(SRRecognizer recognizer)
  373.  THREEWORDINLINE(0x303C, 0x0211, 0xAA56);
  374.  
  375. extern pascal OSErr SRIdle(void )
  376.  THREEWORDINLINE(0x303C, 0x0028, 0xAA56);
  377.  
  378. /* Language Model Building and Manipulation Functions */
  379. extern pascal OSErr SRNewLanguageModel(SRRecognitionSystem system, SRLanguageModel *model, const void *name, Size nameLength)
  380.  THREEWORDINLINE(0x303C, 0x0812, 0xAA56);
  381.  
  382. extern pascal OSErr SRNewPath(SRRecognitionSystem system, SRPath *path)
  383.  THREEWORDINLINE(0x303C, 0x0413, 0xAA56);
  384.  
  385. extern pascal OSErr SRNewPhrase(SRRecognitionSystem system, SRPhrase *phrase, const void *text, Size textLength)
  386.  THREEWORDINLINE(0x303C, 0x0814, 0xAA56);
  387.  
  388. extern pascal OSErr SRNewWord(SRRecognitionSystem system, SRWord *word, const void *text, Size textLength)
  389.  THREEWORDINLINE(0x303C, 0x0815, 0xAA56);
  390.  
  391. /* Operations on any object of the SRLanguageObject family */
  392. extern pascal OSErr SRPutLanguageObjectIntoHandle(SRLanguageObject languageObject, Handle lobjHandle)
  393.  THREEWORDINLINE(0x303C, 0x0416, 0xAA56);
  394.  
  395. extern pascal OSErr SRPutLanguageObjectIntoDataFile(SRLanguageObject languageObject, short fRefNum)
  396.  THREEWORDINLINE(0x303C, 0x0328, 0xAA56);
  397.  
  398. extern pascal OSErr SRNewLanguageObjectFromHandle(SRRecognitionSystem system, SRLanguageObject *languageObject, Handle lObjHandle)
  399.  THREEWORDINLINE(0x303C, 0x0417, 0xAA56);
  400.  
  401. extern pascal OSErr SRNewLanguageObjectFromDataFile(SRRecognitionSystem system, SRLanguageObject *languageObject, short fRefNum)
  402.  THREEWORDINLINE(0x303C, 0x0427, 0xAA56);
  403.  
  404. extern pascal OSErr SREmptyLanguageObject(SRLanguageObject languageObject)
  405.  THREEWORDINLINE(0x303C, 0x0218, 0xAA56);
  406.  
  407. extern pascal OSErr SRChangeLanguageObject(SRLanguageObject languageObject, const void *text, Size textLength)
  408.  THREEWORDINLINE(0x303C, 0x0619, 0xAA56);
  409.  
  410. extern pascal OSErr SRAddLanguageObject(SRLanguageObject base, SRLanguageObject addon)
  411.  THREEWORDINLINE(0x303C, 0x041A, 0xAA56);
  412.  
  413. extern pascal OSErr SRAddText(SRLanguageObject base, const void *text, Size textLength, long refCon)
  414.  THREEWORDINLINE(0x303C, 0x081B, 0xAA56);
  415.  
  416. extern pascal OSErr SRRemoveLanguageObject(SRLanguageObject base, SRLanguageObject toRemove)
  417.  THREEWORDINLINE(0x303C, 0x041C, 0xAA56);
  418.  
  419. /* Traversing SRRecognitionResults or SRLanguageObjects */
  420. extern pascal OSErr SRCountItems(SRSpeechObject container, long *count)
  421.  THREEWORDINLINE(0x303C, 0x0405, 0xAA56);
  422.  
  423. extern pascal OSErr SRGetIndexedItem(SRSpeechObject container, SRSpeechObject *item, long index)
  424.  THREEWORDINLINE(0x303C, 0x0606, 0xAA56);
  425.  
  426. extern pascal OSErr SRSetIndexedItem(SRSpeechObject container, SRSpeechObject item, long index)
  427.  THREEWORDINLINE(0x303C, 0x0607, 0xAA56);
  428.  
  429. extern pascal OSErr SRRemoveIndexedItem(SRSpeechObject container, long index)
  430.  THREEWORDINLINE(0x303C, 0x0408, 0xAA56);
  431.  
  432. /* Utilizing the System Feedback Window */
  433. extern pascal OSErr SRDrawText(SRRecognizer recognizer, const void *dispText, Size dispLength)
  434.  THREEWORDINLINE(0x303C, 0x0621, 0xAA56);
  435.  
  436. extern pascal OSErr SRDrawRecognizedText(SRRecognizer recognizer, const void *dispText, Size dispLength)
  437.  THREEWORDINLINE(0x303C, 0x0622, 0xAA56);
  438.  
  439. extern pascal OSErr SRSpeakText(SRRecognizer recognizer, const void *speakText, Size speakLength)
  440.  THREEWORDINLINE(0x303C, 0x0620, 0xAA56);
  441.  
  442. extern pascal OSErr SRSpeakAndDrawText(SRRecognizer recognizer, const void *text, Size textLength)
  443.  THREEWORDINLINE(0x303C, 0x061F, 0xAA56);
  444.  
  445. extern pascal OSErr SRStopSpeech(SRRecognizer recognizer)
  446.  THREEWORDINLINE(0x303C, 0x0223, 0xAA56);
  447.  
  448. extern pascal Boolean SRSpeechBusy(SRRecognizer recognizer)
  449.  THREEWORDINLINE(0x303C, 0x0224, 0xAA56);
  450.  
  451. extern pascal OSErr SRProcessBegin(SRRecognizer recognizer, Boolean failed)
  452.  THREEWORDINLINE(0x303C, 0x031D, 0xAA56);
  453.  
  454. extern pascal OSErr SRProcessEnd(SRRecognizer recognizer, Boolean failed)
  455.  THREEWORDINLINE(0x303C, 0x031E, 0xAA56);
  456.  
  457.  
  458. #if PRAGMA_ALIGN_SUPPORTED
  459. #pragma options align=reset
  460. #endif
  461.  
  462. #if PRAGMA_IMPORT_SUPPORTED
  463. #pragma import off
  464. #endif
  465.  
  466. #ifdef __cplusplus
  467. }
  468. #endif
  469.  
  470. #endif /* __SPEECHRECOGNITION__ */
  471.  
  472.